import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: '/home',
    name: 'home',
    component: () => import(/* webpackChunkName: "home" */ '../views/HomeView.vue')
  },
  {
    path: '/koubei',
    name: 'koubei',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "koubei" */ '../views/KouBei.vue')
  },
  {
    path: '/friend',
    name: 'friend',
    component: () => import(/* webpackChunkName: "friend" */ '../views/Friend.vue')
  },
  {
    path: '/licai',
    name: 'liacai',
    component: () => import(/* webpackChunkName: "licai" */ '../views/LiCai.vue')

  },
  {
    path: '/my',
    name: 'my',
    component: () => import(/* webpackChunkName: "my" */ '../views/My.vue')

  },
  {
    path: '/main',
    name: 'main',
    component: () => import(/* webpackChunkName: "main" */ '../components/caozuo.vue')

  }
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
